package com.zds.mydatabinding.glide;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Toast;

import com.bumptech.glide.Glide;
import com.zds.mydatabinding.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class GlideActivity extends AppCompatActivity {
    private ImageView imgDownlode;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_glide);
        imgDownlode = (ImageView) findViewById(R.id.img_downlode);
        findViewById(R.id.btn_downlode).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(GlideActivity.this,"ddd",Toast.LENGTH_SHORT).show();
                Glide.with(GlideActivity.this).load("https://img3.doubanio.com/view/movie_poster_cover/lpst/public/p2496088130.jpg").into(imgDownlode);
            }
        });
    }
}
